3.7 \(\int \frac{a+b x^2}{x^2} \, dx\)

Optimal. Leaf size=10 \[ b x-\frac{a}{x} \]

[Out]

-(a/x) + b*x

________________________________________________________________________________________

Rubi [A]  time = 0.0041099, antiderivative size = 10, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {14} \[ b x-\frac{a}{x} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)/x^2,x]

[Out]

-(a/x) + b*x

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{a+b x^2}{x^2} \, dx &=\int \left (b+\frac{a}{x^2}\right ) \, dx\\ &=-\frac{a}{x}+b x\\ \end{align*}

Mathematica [A]  time = 0.0007458, size = 10, normalized size = 1. \[ b x-\frac{a}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)/x^2,x]

[Out]

-(a/x) + b*x

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 11, normalized size = 1.1 \begin{align*} -{\frac{a}{x}}+bx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)/x^2,x)

[Out]

-a/x+b*x

________________________________________________________________________________________

Maxima [A]  time = 1.71266, size = 14, normalized size = 1.4 \begin{align*} b x - \frac{a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2,x, algorithm="maxima")

[Out]

b*x - a/x

________________________________________________________________________________________

Fricas [A]  time = 1.38232, size = 20, normalized size = 2. \begin{align*} \frac{b x^{2} - a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2,x, algorithm="fricas")

[Out]

(b*x^2 - a)/x

________________________________________________________________________________________

Sympy [A]  time = 0.234187, size = 5, normalized size = 0.5 \begin{align*} - \frac{a}{x} + b x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)/x**2,x)

[Out]

-a/x + b*x

________________________________________________________________________________________

Giac [A]  time = 2.6104, size = 14, normalized size = 1.4 \begin{align*} b x - \frac{a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2,x, algorithm="giac")

[Out]

b*x - a/x